package com.rw.coco.handler.message.reply.handler.validate;

import com.rw.coco.handler.message.event.CocoMessageEvent;
import com.rw.coco.handler.message.reply.ReplyFilter;

/**
 * 机器人开关拦截器
 */
public class BotSwitchFilter extends ReplyFilter {
    @Override
    public boolean trigger(CocoMessageEvent cocoMessageEvent) {
        // 如果机器人未开启，则拦截
        return !cocoMessageEvent.getBotModel().getSwitchOn();
    }
}
